<template>
  <div>
    <p @click="resetMap">复位</p>
  </div>
</template>

<script setup>
let $map = null;

onMounted(() => {
  $map = inject("$map");
});

// 定位
function resetMap() {
  $map.getView().animate({
    center: [114.3694, 30.49],
    zoom: 13,
    duration: 1000,
  });
}
</script>

<style lang="scss" scoped></style>
